package com.cloud.mybatis.mapper;


import com.cloud.mybatis.entity.UserEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from mayikt_users")
    List<UserEntity> getByUsers();

    @Insert("insert into mayikt_users(name) values(#{userEntity.name})")
    void add(@Param("userEntity") UserEntity userEntity);

    @Select("select * from mayikt_users")
    List<UserEntity> getList();
}